from django.urls import path, include
from rest_framework.routers import SimpleRouter

from apps.app_auth_provider.api_viewsets import (
    AuthorizeViewSet,
    EmailVerificationCodeViewSet,
    TokenViewSet,
    AuthProviderViewSet,
)

app_name = 'app_auth_provider'


no_slash_router = SimpleRouter(trailing_slash=False)
no_slash_router.register(r'authorize', AuthorizeViewSet, basename='authorize')
no_slash_router.register(r'email/verification', EmailVerificationCodeViewSet, basename='email-verification')
no_slash_router.register(r'token', TokenViewSet, basename='token')
no_slash_router.register(r'providers', AuthProviderViewSet, basename='providers')


urlpatterns = [
    path('', include(no_slash_router.urls)),
]
